package com.alm.handle.core.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * 设备异常信息实体类
 *
 * @author 詹泽峰
 * @date 2024/07/24 17:10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("alm_dev_exception")
public class AlmDevException implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id，自增，主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 设备mac地址
     */
    @TableField(value = "mac")
    private String mac;

    /**
     * 设备类型
     */
    @TableField(value = "dev_type")
    private Integer devType;

    /**
     * 异常类型
     */
    @TableField(value = "dev_ex_type")
    private String devExType;

    /**
     * 异常信息
     */
    @TableField(value = "dev_ex_info")
    private String devExInfo;

    /**
     * 是否已被查看
     */
    @TableField(value = "is_viewed")
    private boolean isViewed;

    /**
     * 发生时间（时间戳）
     */
    @TableField(value = "occur_time")
    private Long occurTime;

    public boolean getIsViewed() {
        return isViewed;
    }
}
